

import { request} from '@/utils/request.util';
import type {Response}from '@/types/common';
import type { SupplyForm ,SupplyResponse,SupplyInfo } from '@/types/supply'
import type {Res} from '@/types/root'

//供应商列表
export const getSupplyList = (body:SupplyForm)=> request.get<SupplyResponse>("/stock/supply/getSupplyList",{
  params: body
});

//删除供应商
export const deleteSupply = (supplyId: number) => request.post<Response<Res>>("/stock/supply/deleteSupply", { supplyId });
//启用药库
export const enableSupply = (supplyId: number) => request.post<Response<Res>>("/stock/supply/enableSupply", { supplyId });
//停用药库
export const disableSupply = (supplyId: number) => request.post<Response<Res>>("/stock/supply/disableSupply", { supplyId });  

//新增供应商
export const addStorage = (body: SupplyInfo) => request.post<Response<Res>>("/stock/supply/addSupply", body);

//编辑供应商
export const updateSupply = (body: SupplyInfo) => request.post<Response<Res>>("/stock/supply/updateSupply", body);